package com.main.dao;

import java.sql.SQLException;
import java.util.List;

import org.hibernate.HibernateException;

import com.main.pojo.TrollJoke;
import com.main.pojo.TrollPhoto;

public interface TrollDAO {

	public List<TrollPhoto> getTrollPhoto(int pageNumber) throws Exception;
	public List<TrollPhoto> getTrollPhotoByUploader(int uploaderId, int pageNumber) throws Exception;
	public TrollPhoto getTrollPhotoById(int id) throws Exception;
	public List<TrollJoke> getTrollJoke(int pageNumber)throws Exception;
	public List<TrollJoke> getJokeRelative(int pageNumber)throws Exception;
	public TrollJoke getTrollJokeById(int jokeId)throws Exception;
	public int addTrollPhoto(TrollPhoto troll)throws HibernateException, SQLException;
	public int getNextTroll(int curentTrollId) throws Exception;
	public int getPrevTroll(int curentTrollId) throws Exception;
	public List<TrollPhoto> getPhotoMostView() throws Exception;
	public List<TrollJoke> getJokeMostView() throws Exception;
	public void updateLike(int trollId) throws Exception;
	public void updateComment(int trollId) throws Exception;
	public String getMessage() throws Exception;
}
